3.18 \(\int (a+b \csc ^{-1}(c x))^2 \, dx\)

Optimal. Leaf size=84 \[ -\frac{2 i b^2 \text{PolyLog}\left (2,-e^{i \csc ^{-1}(c x)}\right )}{c}+\frac{2 i b^2 \text{PolyLog}\left (2,e^{i \csc ^{-1}(c x)}\right )}{c}+x \left (a+b \csc ^{-1}(c x)\right )^2+\frac{4 b \tanh ^{-1}\left (e^{i \csc ^{-1}(c x)}\right ) \left (a+b \csc ^{-1}(c x)\right )}{c} \]

[Out]

x*(a + b*ArcCsc[c*x])^2 + (4*b*(a + b*ArcCsc[c*x])*ArcTanh[E^(I*ArcCsc[c*x])])/c - ((2*I)*b^2*PolyLog[2, -E^(I
*ArcCsc[c*x])])/c + ((2*I)*b^2*PolyLog[2, E^(I*ArcCsc[c*x])])/c

________________________________________________________________________________________

Rubi [A]  time = 0.0675351, antiderivative size = 84, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {5217, 4410, 4183, 2279, 2391} \[ -\frac{2 i b^2 \text{PolyLog}\left (2,-e^{i \csc ^{-1}(c x)}\right )}{c}+\frac{2 i b^2 \text{PolyLog}\left (2,e^{i \csc ^{-1}(c x)}\right )}{c}+x \left (a+b \csc ^{-1}(c x)\right )^2+\frac{4 b \tanh ^{-1}\left (e^{i \csc ^{-1}(c x)}\right ) \left (a+b \csc ^{-1}(c x)\right )}{c} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcCsc[c*x])^2,x]

[Out]

x*(a + b*ArcCsc[c*x])^2 + (4*b*(a + b*ArcCsc[c*x])*ArcTanh[E^(I*ArcCsc[c*x])])/c - ((2*I)*b^2*PolyLog[2, -E^(I
*ArcCsc[c*x])])/c + ((2*I)*b^2*PolyLog[2, E^(I*ArcCsc[c*x])])/c

Rule 5217

Int[((a_.) + ArcCsc[(c_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Dist[c^(-1), Subst[Int[(a + b*x)^n*Csc[x]*Cot[x], x
], x, ArcCsc[c*x]], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[n, 0]

Rule 4410

Int[Cot[(a_.) + (b_.)*(x_)]^(p_.)*Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp
[((c + d*x)^m*Csc[a + b*x]^n)/(b*n), x] + Dist[(d*m)/(b*n), Int[(c + d*x)^(m - 1)*Csc[a + b*x]^n, x], x] /; Fr
eeQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]

Rule 4183

Int[csc[(e_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c + d*x)^m*ArcTanh[E^(I*(e + f*
x))])/f, x] + (-Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 - E^(I*(e + f*x))], x], x] + Dist[(d*m)/f, Int[(c +
d*x)^(m - 1)*Log[1 + E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e, f}, x] && IGtQ[m, 0]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \left (a+b \csc ^{-1}(c x)\right )^2 \, dx &=-\frac{\operatorname{Subst}\left (\int (a+b x)^2 \cot (x) \csc (x) \, dx,x,\csc ^{-1}(c x)\right )}{c}\\ &=x \left (a+b \csc ^{-1}(c x)\right )^2-\frac{(2 b) \operatorname{Subst}\left (\int (a+b x) \csc (x) \, dx,x,\csc ^{-1}(c x)\right )}{c}\\ &=x \left (a+b \csc ^{-1}(c x)\right )^2+\frac{4 b \left (a+b \csc ^{-1}(c x)\right ) \tanh ^{-1}\left (e^{i \csc ^{-1}(c x)}\right )}{c}+\frac{\left (2 b^2\right ) \operatorname{Subst}\left (\int \log \left (1-e^{i x}\right ) \, dx,x,\csc ^{-1}(c x)\right )}{c}-\frac{\left (2 b^2\right ) \operatorname{Subst}\left (\int \log \left (1+e^{i x}\right ) \, dx,x,\csc ^{-1}(c x)\right )}{c}\\ &=x \left (a+b \csc ^{-1}(c x)\right )^2+\frac{4 b \left (a+b \csc ^{-1}(c x)\right ) \tanh ^{-1}\left (e^{i \csc ^{-1}(c x)}\right )}{c}-\frac{\left (2 i b^2\right ) \operatorname{Subst}\left (\int \frac{\log (1-x)}{x} \, dx,x,e^{i \csc ^{-1}(c x)}\right )}{c}+\frac{\left (2 i b^2\right ) \operatorname{Subst}\left (\int \frac{\log (1+x)}{x} \, dx,x,e^{i \csc ^{-1}(c x)}\right )}{c}\\ &=x \left (a+b \csc ^{-1}(c x)\right )^2+\frac{4 b \left (a+b \csc ^{-1}(c x)\right ) \tanh ^{-1}\left (e^{i \csc ^{-1}(c x)}\right )}{c}-\frac{2 i b^2 \text{Li}_2\left (-e^{i \csc ^{-1}(c x)}\right )}{c}+\frac{2 i b^2 \text{Li}_2\left (e^{i \csc ^{-1}(c x)}\right )}{c}\\ \end{align*}

Mathematica [A]  time = 0.202161, size = 147, normalized size = 1.75 \[ \frac{-2 i b^2 \text{PolyLog}\left (2,-e^{i \csc ^{-1}(c x)}\right )+2 i b^2 \text{PolyLog}\left (2,e^{i \csc ^{-1}(c x)}\right )+a^2 c x+2 a b c x \csc ^{-1}(c x)+2 a b \log \left (\cos \left (\frac{1}{2} \csc ^{-1}(c x)\right )\right )-2 a b \log \left (\sin \left (\frac{1}{2} \csc ^{-1}(c x)\right )\right )+b^2 c x \csc ^{-1}(c x)^2-2 b^2 \csc ^{-1}(c x) \log \left (1-e^{i \csc ^{-1}(c x)}\right )+2 b^2 \csc ^{-1}(c x) \log \left (1+e^{i \csc ^{-1}(c x)}\right )}{c} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*ArcCsc[c*x])^2,x]

[Out]

(a^2*c*x + 2*a*b*c*x*ArcCsc[c*x] + b^2*c*x*ArcCsc[c*x]^2 - 2*b^2*ArcCsc[c*x]*Log[1 - E^(I*ArcCsc[c*x])] + 2*b^
2*ArcCsc[c*x]*Log[1 + E^(I*ArcCsc[c*x])] + 2*a*b*Log[Cos[ArcCsc[c*x]/2]] - 2*a*b*Log[Sin[ArcCsc[c*x]/2]] - (2*
I)*b^2*PolyLog[2, -E^(I*ArcCsc[c*x])] + (2*I)*b^2*PolyLog[2, E^(I*ArcCsc[c*x])])/c

________________________________________________________________________________________

Maple [A]  time = 0.266, size = 196, normalized size = 2.3 \begin{align*} x{b}^{2} \left ({\rm arccsc} \left (cx\right ) \right ) ^{2}+2\,xab{\rm arccsc} \left (cx\right )-2\,{\frac{{b}^{2}{\rm arccsc} \left (cx\right )}{c}\ln \left ( 1-{\frac{i}{cx}}-\sqrt{1-{\frac{1}{{c}^{2}{x}^{2}}}} \right ) }+2\,{\frac{{b}^{2}{\rm arccsc} \left (cx\right )}{c}\ln \left ( 1+{\frac{i}{cx}}+\sqrt{1-{\frac{1}{{c}^{2}{x}^{2}}}} \right ) }-{\frac{2\,i{b}^{2}}{c}{\it polylog} \left ( 2,{\frac{-i}{cx}}-\sqrt{1-{\frac{1}{{c}^{2}{x}^{2}}}} \right ) }+{\frac{2\,i{b}^{2}}{c}{\it polylog} \left ( 2,{\frac{i}{cx}}+\sqrt{1-{\frac{1}{{c}^{2}{x}^{2}}}} \right ) }+{a}^{2}x+2\,{\frac{ab}{c}\ln \left ( cx+cx\sqrt{1-{\frac{1}{{c}^{2}{x}^{2}}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arccsc(c*x))^2,x)

[Out]

x*b^2*arccsc(c*x)^2+2*x*a*b*arccsc(c*x)-2/c*b^2*arccsc(c*x)*ln(1-I/c/x-(1-1/c^2/x^2)^(1/2))+2/c*b^2*arccsc(c*x
)*ln(1+I/c/x+(1-1/c^2/x^2)^(1/2))-2*I*b^2*polylog(2,-I/c/x-(1-1/c^2/x^2)^(1/2))/c+2*I*b^2*polylog(2,I/c/x+(1-1
/c^2/x^2)^(1/2))/c+a^2*x+2/c*ln(c*x+c*x*(1-1/c^2/x^2)^(1/2))*a*b

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\frac{1}{4} \,{\left (2 \, c^{2}{\left (\frac{2 \, x}{c^{2}} - \frac{\log \left (c x + 1\right )}{c^{3}} + \frac{\log \left (c x - 1\right )}{c^{3}}\right )} \log \left (c\right )^{2} - 4 \, c^{2} \int \frac{x^{2} \log \left (c^{2} x^{2}\right )}{c^{2} x^{2} - 1}\,{d x} \log \left (c\right ) + 8 \, c^{2} \int \frac{x^{2} \log \left (x\right )}{c^{2} x^{2} - 1}\,{d x} \log \left (c\right ) - 4 \, x \arctan \left (1, \sqrt{c x + 1} \sqrt{c x - 1}\right )^{2} - 4 \, c^{2} \int \frac{x^{2} \log \left (c^{2} x^{2}\right ) \log \left (x\right )}{c^{2} x^{2} - 1}\,{d x} + 4 \, c^{2} \int \frac{x^{2} \log \left (x\right )^{2}}{c^{2} x^{2} - 1}\,{d x} - 4 \, c^{2} \int \frac{x^{2} \log \left (c^{2} x^{2}\right )}{c^{2} x^{2} - 1}\,{d x} + x \log \left (c^{2} x^{2}\right )^{2} + 2 \,{\left (\frac{\log \left (c x + 1\right )}{c} - \frac{\log \left (c x - 1\right )}{c}\right )} \log \left (c\right )^{2} + 4 \, \int \frac{\log \left (c^{2} x^{2}\right )}{c^{2} x^{2} - 1}\,{d x} \log \left (c\right ) - 8 \, \int \frac{\log \left (x\right )}{c^{2} x^{2} - 1}\,{d x} \log \left (c\right ) - 8 \, \int \frac{\sqrt{c x + 1} \sqrt{c x - 1} \arctan \left (\frac{1}{\sqrt{c x + 1} \sqrt{c x - 1}}\right )}{c^{2} x^{2} - 1}\,{d x} + 4 \, \int \frac{\log \left (c^{2} x^{2}\right ) \log \left (x\right )}{c^{2} x^{2} - 1}\,{d x} - 4 \, \int \frac{\log \left (x\right )^{2}}{c^{2} x^{2} - 1}\,{d x} + 4 \, \int \frac{\log \left (c^{2} x^{2}\right )}{c^{2} x^{2} - 1}\,{d x}\right )} b^{2} + a^{2} x + \frac{{\left (2 \, c x \operatorname{arccsc}\left (c x\right ) + \log \left (\sqrt{-\frac{1}{c^{2} x^{2}} + 1} + 1\right ) - \log \left (-\sqrt{-\frac{1}{c^{2} x^{2}} + 1} + 1\right )\right )} a b}{c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arccsc(c*x))^2,x, algorithm="maxima")

[Out]

-1/4*(2*c^2*(2*x/c^2 - log(c*x + 1)/c^3 + log(c*x - 1)/c^3)*log(c)^2 - 4*c^2*integrate(x^2*log(c^2*x^2)/(c^2*x
^2 - 1), x)*log(c) + 8*c^2*integrate(x^2*log(x)/(c^2*x^2 - 1), x)*log(c) - 4*x*arctan2(1, sqrt(c*x + 1)*sqrt(c
*x - 1))^2 - 4*c^2*integrate(x^2*log(c^2*x^2)*log(x)/(c^2*x^2 - 1), x) + 4*c^2*integrate(x^2*log(x)^2/(c^2*x^2
 - 1), x) - 4*c^2*integrate(x^2*log(c^2*x^2)/(c^2*x^2 - 1), x) + x*log(c^2*x^2)^2 + 2*(log(c*x + 1)/c - log(c*
x - 1)/c)*log(c)^2 + 4*integrate(log(c^2*x^2)/(c^2*x^2 - 1), x)*log(c) - 8*integrate(log(x)/(c^2*x^2 - 1), x)*
log(c) - 8*integrate(sqrt(c*x + 1)*sqrt(c*x - 1)*arctan(1/(sqrt(c*x + 1)*sqrt(c*x - 1)))/(c^2*x^2 - 1), x) + 4
*integrate(log(c^2*x^2)*log(x)/(c^2*x^2 - 1), x) - 4*integrate(log(x)^2/(c^2*x^2 - 1), x) + 4*integrate(log(c^
2*x^2)/(c^2*x^2 - 1), x))*b^2 + a^2*x + (2*c*x*arccsc(c*x) + log(sqrt(-1/(c^2*x^2) + 1) + 1) - log(-sqrt(-1/(c
^2*x^2) + 1) + 1))*a*b/c

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (b^{2} \operatorname{arccsc}\left (c x\right )^{2} + 2 \, a b \operatorname{arccsc}\left (c x\right ) + a^{2}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arccsc(c*x))^2,x, algorithm="fricas")

[Out]

integral(b^2*arccsc(c*x)^2 + 2*a*b*arccsc(c*x) + a^2, x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \operatorname{acsc}{\left (c x \right )}\right )^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*acsc(c*x))**2,x)

[Out]

Integral((a + b*acsc(c*x))**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \operatorname{arccsc}\left (c x\right ) + a\right )}^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arccsc(c*x))^2,x, algorithm="giac")

[Out]

integrate((b*arccsc(c*x) + a)^2, x)